class CreateQuestionnaireEventTypes < ActiveRecord::Migration
	def self.up
		create_table :questionnaire_event_types do |t|
			t.column :name, :string, :null => false
			t.column :rank, :integer
			t.timestamps
		end
		
		QuestionnaireEventType.create :name => "Mailed to respondent", :rank => 1
		QuestionnaireEventType.create :name => "Sent reminder"
		QuestionnaireEventType.create :name => "Filled out by respondent", :rank => 3
		QuestionnaireEventType.create :name => "Filled out by interviewer", :rank => 3
		QuestionnaireEventType.create :name => "Sent for processing", :rank => 4
		QuestionnaireEventType.create :name => "Recieved for processing", :rank => 5
		QuestionnaireEventType.create :name => "Processed", :rank => 6
		QuestionnaireEventType.create :name => "Never completed", :rank => 6
		QuestionnaireEventType.create :name => "Other"
	end
	
	def self.down
		drop_table :questionnaire_event_types
	end
end
